#include <iostream>
#include <signal.h>
#include <unistd.h>
using namespace std;

//kill模拟实现
//kill -9 pid
int main(int argc,char* argv[])
{
    if(argc!=3)
    {
        cout<<"输入方式错误"<<endl;
        cout<<"please input "<<argv[0]<<" + "<<"signum + process_id"<<endl;
        return -1;
    }
    int signum = stoi(argv[1]+1);//去掉'-'字符
    int process_id = stoi(argv[2]);
    kill(process_id,signum);
    
    return 0;
}